HAL SD state and error functions

This section provides information about HAL SD state and error handling for STM32 HAL1 to HAL2 migration.

HAL SD get error

HAL1

HAL2

uint32_t HAL_SD_GetError(const SD_HandleTypeDef *hsd)
uint32_t HAL_SD_GetLastErrorCodes(const hal_sd_handle_t *hsd)

HAL SD get state

HAL1

HAL2

HAL_SD_StateTypeDef HAL_SD_GetState(const SD_HandleTypeDef *hsd)
hal_sd_state_t HAL_SD_GetState(const hal_sd_handle_t *hsd)

HAL SD get card state

HAL1

HAL2

HAL_SD_CardStateTypeDef HAL_SD_GetCardState(SD_HandleTypeDef *hsd)
hal_sd_card_state_t HAL_SD_GetCardState(const hal_sd_handle_t *hsd)